﻿using System.Collections.Generic;
using Framework.Repository.Conventions;

namespace Framework.Tests.Repository.Entities
{
    public abstract class Person
    {
        protected Person()
        {
        }

        protected Person(string name)
        {
            Name = name;
        }

        public virtual int Id { get; protected set; }
        public virtual string Name { get; protected set; }
    }

    [Entity, SubClass]
    public abstract class User : Person
    {
        protected User()
        {
        }

        protected User(string name, Society society)
            : base(name)
        {
            Rights = new List<Right>();
            Society = society;
        }

        public virtual IList<Right> Rights { get; protected set; }
        public virtual Society Society { get; protected set; }
    }
}